package chapter03;

public class Test04_interface1 {
    public static void main(String[] args) {
        Dog2 d = new Dog2();
        d.shout();
        d.info();
        d.eat();
        d.black();
    }
}
interface Animal2{
    int ID = 2024;
    String NAME = "大黄";
    void shout();
    void info();
    static int getId(){
        return ID;
    }
}
//多继承接口
interface Action extends Animal2,Color{
    void eat();
}
interface Color{void black();}
class Dog2 implements Action{
    public void shout() {
        System.out.println("汪汪");
    }
    public void info() {
        System.out.println(Animal2.getId());
        System.out.println(Animal2.NAME);
    }
    public void eat() {
        System.out.println("爱吃骨头");
    }
    public void black() {
        System.out.println("黑色");
    }
}
